 <template>
	<view class="content">
		<uni-password ref="secrity" @input="onInput" @confirm="onConfirms" @back="paymentPasswordBack" v-if="pay_pass_display">
			请输入6位支付密码
		</uni-password>
		<!-- 头部图片展示页面 -->
		<view class="mianImageBox">
			<!-- 返回按钮、分享按钮 -->
			<!-- <view class="operateBox">
				
				<uni-icon class="titleIcon" type="arrowleft" size="30" @click="back"></uni-icon>
				
				<uni-icon class="titleIcon right" type="upload" size="30"></uni-icon>
			</view> -->
			<!-- 商品轮播图片展示区域 -->
			<view class="casual">
				<swiper class="swiper-box" indicator-dots="true" autoplay="true" interval="3000" duration="500" :style="{'height':getSystemInfo.windowWidth+'px'}">
			
					<swiper-item class="swiper" v-for="item in goodsInfos.imgInfo" >  
						<image :src="address+item" class="image" mode="aspectFit"></image>
					</swiper-item>
					
				</swiper>
			</view>
			<!-- 价格栏 -->
			<view class="price">
				<!-- <text v-if="!goodsInfos.money_min">0</text>
				<text v-if="goodsInfos.money_min!=goodsInfos.money_max">￥{{goodsInfos.money_min/100}}~{{goodsInfos.money_max/100}}</text>
				<text v-else>￥{{goodsInfos.money_min/100}}</text> -->
				<!-- <text>单价￥</text> -->
				<!-- <text>特价</text> -->
				<text v-if="!goodsGroups.price">0</text>
				<text v-if="goodsGroups.price">￥{{goodsGroups.price/100}}</text>
			</view>
			
			<!-- 商品信息栏 -->
			<view class="goodsInfor">
				<!-- <view class="discountCard">
					<text>V</text>
					<text>96折扣</text>
					<text>黑卡下单再享96折</text>
					<text>开卡 ></text>
				</view> -->
				<view class="goodsdes">
					<!-- <view class="choose-kinds">
						<text>1件装 | 单价79元</text>
						<text class="ex">3件装 | 单件56.4元</text>
					</view> -->
					<view class="goods-name">
						<text class="self" v-if="!shop_id">自营</text>
						<text clas="all-name">{{goodsInfos.title}}</text>
						<text class="details-des">{{goodsInfos.description}}</text>
					</view>
					<!-- <view class="other-des">
						<view class="origin">
							<image class="img" src="../../static/raw_1522223516.png" mode=""></image>
							<text>韩国品牌</text>
						</view>
						<view class="method">
							<image src="../../static/fly.png" mode=""></image>
							<text>跨境商品</text>
						</view>
					</view> -->
				</view>
				<view class="deliverInfor">
					<view class="to">
						<text class="first">配送</text>
						<text class="to">至</text>
						<text>{{toFrom}}</text>
						
					</view>
					<!-- <view class="freight">
						<text class="first">运费</text>
						<text>免运费</text>
						<text class="icon"> ></text>
						
					</view> -->
					<!-- <view class="intro">
						<text class="first">说明</text>
					
					</view> -->
				</view>
				
				<!-- 进入品牌专区 -->
				<view class="brandStore">
					<!-- <view class="brand-title">
						<image src="../../static/f27da758a86543d7.jpg" mode=""></image>
						<view class="good-items">
							<text>MEDIHEAL 美迪惠尔</text>
							<text>在售商品 69件</text>
						</view>
						<text class="enter">进入品牌</text>
						<text class="icon"> ></text>
					</view> -->
					
					<view class="guessGoodsBox">
						<view class="imgDetails" >
							<view class="imgDetails-title">
								<text>图文详情</text>
							</view>
							<view class="productsBox" style="margin-bottom: 100px;">
								<text class="infor">产品信息</text>
								<view class="messageBox">
									 <rich-text :nodes="details"></rich-text>
								</view>
								<!-- 非主图图片 -->
								<view  v-if="imgNoList"  v-for="item in imgNoList" class="imgNoLists">
									<!-- ?imageMogr2/thumbnail/414x822/q/100!/interlace/1/sharpen/1/format/jpg -->
									<!-- ?imageView2/5/h/ /w/ /q/100/format/png -->
									<image :src="address+item.image_id" :style="{'height':item.autoHeight+'px','width':getSystemInfo.windowWidth+'x'}" mode="aspectFit" class="imgNo_img"></image>
								</view>
							</view>
								<!-- <image v-if="goods_image_display" v-for="i in goods_image" :src="address+ i" style="width: 100%;" ></image> -->
								<!-- <view class="getMore" @click="goods_image_display=!goods_image_display">
									<text  v-if="!goods_image_display" >展开</text>
									<uni-icon  v-if="!goods_image_display"  type="arrowdown" size="30"></uni-icon>
									<text  v-if="goods_image_display" >收起</text>
									<uni-icon  v-if="goods_image_display"  type="arrowup" size="30"></uni-icon>
								</view> -->
							<!-- <view class="brandAuth">
								<text>品牌</text>
								<text>授权</text>
							</view> -->
						</view>
					</view>
				</view>
			</view>
			<!-- 底部购物车功能 -->
			<view class="shoppingCarBox">
				<text class="buy" @click="showContgo">立即购买</text>  <!-- v-if="!pay_display" -->
			</view>
			
			<view class="shoppingx" v-show="xs">
				<!-- 底部弹出框 -->
			  <view class="shoppingxx">
				  <text style="color:#ea3e3e;font-weight: 600; margin-bottom: 10upx;">￥{{goodsGroups.price/100}}</text>   
				  <text style="float:right;" v-show="!xs"><uni-icon type="closeempty" size="30"></uni-icon></text>
			  	<view>
					<text>库存: </text>
					<text style="color:#ea3e3e;">{{stock}}</text>
				</view>
				
				<view v-for="(item,index) in goods_spu" :key="index">
					<text class="text-title">{{item.name}}</text>
					<view class="shoppingx-span">
						<view  class="shopping-for" v-for="(items,indexs) in item.son" :key="indexs">
							<text class="change1" :class="items.class_change" @click="select(items.class_change,items.id,index,indexs)">
							{{items.name}}
							</text>
						</view>
					</view>
				</view>
				
				
				<view class="quantity ">
					<text>购买数量</text>
					<view class="quantity-right">
						<!-- <text @click="add">+</text> -->
						<text>{{number}}</text>
						<!-- <text @click="lose">-</text> -->
					</view>
				</view>
				<view class="ascertain">
					<button type="warn"  @click="toCar()" :disabled="button_disabled">确定</button>
				</view>
				<view class="close">
					<uni-icon type="closeempty" size="30" @click="showCont"></uni-icon>
				</view>
			  </view>
			</view>
			
		</view>
		
			<!-- 新建地址页面-->
		<view class="mask_content"  v-if="isNew">	
			<view class="new-address-box">
				<view class="new-address-item_">
					<view class="address_">
						<text class="address-item">新建地址</text>
						<uni-icon class="icon" type="arrowdown" size="24" @click="isNew=!isNew"></uni-icon>
					</view>
					<view class="main-content">
						<view class="name-box">
							<input class="name" type="text" v-model="user.consignee" placeholder="收货人姓名(请使用真实姓名)"/>
						</view>
						<view class="phone-box">
							<input class="phone" type="text" v-model="user.phone" placeholder="手机号码"/>
						</view>
						<view class="area-box">
							<input disabled="true" class="area" type="text" :value="userAddress" placeholder="所在地区" @click="showMulLinkageThreePicker" />
						</view>
						<view class="details-box">
							<input class="details" type="text" v-model="user.details" placeholder="街道/小区门派等详细地址"/>
						</view>
						<view class="selected-box">
							<view class="empty-box">
								<radio id="main" checked="true"></radio>
							</view>
							<label class="selected-address" for="main" >设为默认地址</label>
						</view>
					</view>
				</view>
				<view class="submit-btn" @click="addAddress()">
					<text>添加地址</text>
				</view>
			</view>
		</view>
		
		<!-- 购物车遮罩页面 -->
		<view class="mask_content" v-if="isShow">
			<view class="mask-box" >
				<view class="mask-item">
					<view class="address"  @click="newAddress">
						<text class="address-item">收货地址</text>
						<text class="add">{{userAddress}}</text>
						<uni-icon class="icon" type="arrowdown" size="24" @click="isShow=!isShow"></uni-icon>
					</view>
					<view class="invoice">
						<text class="address-item">发票</text>
						<text class="add">不支持开发票</text>
						<uni-icon class="icon" type="arrowdown" size="24"></uni-icon>
					</view>
					<view class="ticket">
						<text class="address-item">优惠券</text>
						<text class="add">暂无可用</text>
						<uni-icon class="icon" type="arrowdown" size="24"></uni-icon>
					</view>
					<view class="money">
						<text class="address-item">应付金额</text>
						<text class="add">￥{{goodsGroups.price/100}}</text>
						<!-- <text class="tax">(含税费￥0.00)</text> -->
						<uni-icon class="icon" type="arrowdown" size="24"></uni-icon>
					</view>
				</view>
				<view class="submit-btn" @click="submitOrder">
					<text>提交订单</text>
				</view>
			</view>
		</view>	
		
		<view class="mask_content" v-if="pay_display">
			<!-- 支付方式页面 -->
			<view class="pay-methods" >
				<view class="methods-box">
					<view class="title-box">
						<text class="title">请选择支付方式</text>
						<image src="http://rs.eonfox.cc/clzy/static/closeBtn.png" mode="" @click="pay_display=!pay_display"></image>
					</view>
					<view class="pay-time-box">
					<!-- 	<text class="text">请在0小时30分钟内完成支付 金额</text> -->
						<text class="price">￥{{goodsGroups.price/100}} 元</text>
					</view>
					<view class="ali-pay" :class="{active:(payMounted==1)}" @click="payMounted=1">
						<image src="http://rs.eonfox.cc/clzy/static/unknown.png" mode=""></image>
						<text class="ali">余额支付</text>
						<image v-if="payMounted==1" class="select" src="http://rs.eonfox.cc/clzy/static/choose.png" mode=""></image>
					</view>
					 <!-- #ifdef APP-PLUS -->
					<view class="ali-pay" :class="{active:(payMounted==2)}" @click="payMounted=2">
						<image src="http://rs.eonfox.cc/clzy/static/ali_pay.png" mode=""></image>
						<text class="ali">支付宝</text>
						<image v-if="payMounted==2" class="select" src="http://rs.eonfox.cc/clzy/static/choose.png" mode=""></image>
					</view>
					<!-- #endif -->
					<view class="weChat-pay"  :class=" {active:(payMounted==3)}" @click="payMounted=3">
						<image src="http://rs.eonfox.cc/clzy/static/wechat.png" mode=""></image>
						<text>微信支付</text>
						<image v-if="payMounted==3" class="select" src="http://rs.eonfox.cc/clzy/static/choose.png" mode=""></image>
					</view>
				</view>
				<view class="submit-btn" @click="submitForm()">
					<text>确认支付</text>
				</view>
			</view>
		</view>
		<view>
			<mpvue-picker  ref="mpvuePicker"    @onConfirm="onConfirm" @onCancel="onCancel" ></mpvue-picker>
			<mpvue-city-picker ref="mpvueCityPicker" @onCancel="onCancel" @onConfirm="onConfirm"></mpvue-city-picker>
		</view>
		<!-- 弹出dialog -->
		<view class="">
			<xy-dialog 
				title="提示"
				content="此商品拼团已结束"
				:show="dialogShow"	
				:isShowCancel = "false"
				@confirmButton="clickConfirm"
				
			></xy-dialog>
		</view>
	</view>
	
</template>

<script>
	import uniIcon from "@/components/uni-icon/uni-icon.vue";
	import eonfox from '@/components/eonfox/eonfox.js';
	import fns from '@/components/eonfox/fns.js';
	import mpvuePicker from '@/components/mpvue-picker/mpvuePicker.vue';
	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue';
	import cityData from '@/common/city.data.js';
	import pay from '@/components/eonfox/grouporder.js';
	import city from '../../common/city.data.js';
	import uniPassword from '@/components/ku3gitxdx-payment-password/ku3gitxdx-payment-password.vue'
	import xyDialog  from '@/components/xy-dialog/xy-dialog.vue'
	var ef = new eonfox();
	export default {
		data() {
			return {
				id:'',
				goodsId:'',
				group_id:'',
				imgNo:[],
				imgNoList:[],
				getSystemInfo: {},
				is_end:0,
				goodsInfos: {
					imgInfo:[	
					],
					title:'',
					description:'',
					money_min:0,
					money_max:0
				},
				goodsGroups: {
					id:'',
					people_now:'',
					people:'',
					price:0
				},
				toFrom:'',
				class_change:'selecteds',
				Collection:false,
				xs:false,
				number:1,
				address:'',
				goods_spu:[],
				goods_sku:[],
				sku_arr:[],
				sku_id:'',
				stock:'',
				money_:'',
				repertory:[],
				money:[],
				size:[],
				color:[],
				Discount:[],
				
				details:'',
				pay_display:false,
				pay_password:false,
				address_id:'',
				order_money:0,
				order_id:'',
				way:'',
				shop_id:'',
				due:0  ,//应付款
				isShow:false,
				user:{
					consignee:'',// [str] [必填] [收货人]
					phone:'',
					province:'',//[str] [必填] [省]
					city:'',//        [str] [必填] [市]
					district:'',//    [str] [必填] [区]
					details:"",//     [str] [必填] [详址]
					default:1,//     [int] [可选] [默认地址。1是0否]
				},
				payMounted:1,//1预付款2支付宝3微信
				checkeds:[],
				userAddress:'请添加收货地址',
				isBackgroundShow: false,
				isAli: false,
				isWeCaht: true,
				isNew: false,
				isPay: false,
				isAll:false,
				is_alls:[],
				user_addressList:[],
				pay_pass_display:false,
				order_method:'money',
				OOrder:[],
				pay_method:'',
				code:'',
				openid:'',
				paymentPasswordDispaly:true,
				payMoneyDispaly:false,
				button_disabled:true,
				TheSelected:'',
				dialogShow:false,
			}
		},
		// 加载完成后
		
		onLoad:function(e){
			var that = this
			//获取屏幕宽度
			uni.getSystemInfo({
				success: function(res) {
					that.getSystemInfo = res;
					console.log(res.windowWidth);
				}
			});
			that.button_disabled=true;
			that.pay_pass_display = false;
			that.isNew = false;
			that.xs = false;
			that.pay_display = false;
			that.payMoneyDispaly=false;
			that.sku_id=""
			if(e.id){
				// that.group_id=e.group_id;
				that.goodsId=e.id;
			}
			ef.submit({
				request: {
					config: ['APPLICATIONCONFIG'],
					goods: ['SHOPGOODSGET',[{id:that.goodsId}]],
					address:['USERADDRESSSELFGET'],
					imgNo:['SHOPGOODSIMAGE',[{id:that.goodsId,"sort":{"orderby":"sort_asc"}}]]
				},
				callback: function(data){
					var dataList=fns.checkError(data,['config','goods'],function(errno,error){
						fns.err(error)
					})
					console.log('打印所有参数',data);
					if (!dataList) {
						return false;
					}
					if(dataList.config && dataList.config.qiniu_domain){
						that.address=dataList.config.qiniu_domain;//获取七牛的域名
					}
					if(dataList.address && dataList.address!=''){
							var address=dataList.address
							that.userAddress=address.province+'-'+address.city+'-'+address.district;
								that.toFrom=address.province+address.city+address.district+address.details;
								that.address_id=address.id
								console.log('address',address);
					}
					
					if (dataList.goods) {
						var goods=dataList.goods;						
						that.is_end = dataList.goods.code
						// 判断是否拼团结束
						if(that.is_end==3){
							that.dialogShow = true;							
							return
						}
					    console.log('goods',goods);
					   that.details=goods.details;//商品介绍
					   that.goodsId = goods.id;
					   that.goodsInfos.imgInfo=goods.goods_image;//图片
					   that.goodsInfos.money_min=goods.money_min;//价钱
					   that.goodsInfos.money_max=goods.money_max;//价钱
					   that.goodsInfos.title=goods.name;//标题
					   that.goodsInfos.details=goods.details;//简介
					   // 拼团商品属性
					   
					   that.goodsGroups.people = goods.goods_group.people;
					   that.goodsGroups.people_now = goods.goods_group.people_now;
					   that.goodsGroups.price = goods.goods_group.price;
					   that.goodsGroups.id=goods.goods_group.id;
					   console.log('111111',that.goodsGroups)
					   // that.goodsGroups.num = goods.goods_group.num;
					   // that.goodsGroups.now_num = goods.goods_group.now_num;
					   // that.goodsGroups.groupPrice = goods.goods_group.group_price;
					   
					   console.log(that.goodsInfos.details);
					   that.goodsInfos.description=goods.description;//商品介绍
					   
					   that.shop_id=goods.shop_id//商家id
					   
					   if(goods.goods_sku&&goods.goods_sku[0]&&goods.goods_sku[0].stock){
						   that.stock=goods.goods_sku[0].stock
					   }
					   if(goods.goods_sku&&goods.goods_sku[0]&&goods.goods_sku[0].money){
					   						   that.money_=goods.goods_sku[0].money
					   }
					   var spu=goods.goods_spu;
					   var sku=goods.goods_sku;
					   console.log('spu',spu);
					   for(var i=0; i<spu.length;i++){
						   for(var m=0; m<spu[i].son.length;m++){
							   for (var k=0; k<sku.length;k++) {
									if(sku[k].spu_id.indexOf(spu[i].son[m].id) != -1 ){
										spu[i].son[m].class_change='stockTrue';
									}
							   }
						   }
// 						   i.class_change='selecteds';
// 						   item.push(i)
					   }
					   // goods.goods_sku.son=item
					   console.log('s',goods.goods_sku);
					   that.goods_spu=goods.goods_spu;//商品尺寸颜色优惠等信息
					   that.goods_sku=goods.goods_sku//商品的库存
					  // console.log("spu/sku/in",that.goods_spu,that.goods_sku);
					  
					  if(dataList.imgNo){
					  	console.log(".......",dataList.imgNo);
					  	//等比例算出高度
					  	for(var img in dataList.imgNo){
					  		dataList.imgNo[img].autoHeight = ((that.getSystemInfo.windowWidth/dataList.imgNo[img].width) * dataList.imgNo[img].height).toFixed(0);
					  	}
					  	that.imgNoList = dataList.imgNo;
					  	console.log('1111111111', that.imgNoList);
					  }
					}
                 },
	             error: function(err){
					 fns.err('err',err)
		                 console.log("出错啦", err);
	            },
			});
            //缓存在本地的商品id
// 			uni.setStorage({
// 				key: 'footmark',
// 				data:that.id,
// 				complete: function () {
// 					if (footmark){
// 						footmark = []
// 						footmark.push(that.id)
// 					}
// 				}
// 			});
// 			
// 			let footmark = uni.getStorage({
// 				key:'footmark',
// 				 success: function (res) {
//                  console.log(res.data);
//               }
// 			})
// 				console.log("footmark",footmark);
            let footmark = uni.getStorageSync('footmark')

				if (!footmark)
					footmark = []

				if (!footmark.includes(that.id)) {
					footmark.push(that.id)
				}

				uni.setStorageSync('footmark', footmark)
		},
		components: {
			eonfox,
			mpvuePicker,
			mpvueCityPicker,
			uniPassword,
			uniIcon,
			fns,
			xyDialog
		},
		methods: {
			//弹出框
			clickConfirm(){
				uni.reLaunch({
					url:'../../pages/index/index'
				})
			},
			//提价订单
			submitOrder(){
				this.isShow = false;
				this.pay_display=true;
				if(!this.address_id){
					uni.showToast({
						title:'收货地址不能为空',
						icon:'none'
					})
					this.pay_display = false;
					this.isShow = false;
					this.xs=false;
				}
			},
			//添加收货地址
			addAddress(){
				var info=this.user,_this=this;
				if(!info.consignee||!info.phone||!info.province||!info.city||!info.district||!info.details){
					uni.showToast({
						title:'有未填项',
						icon:'none'
					})
					return;
				}	
				ef.submit({
					request:{
						add:['USERADDRESSSELFADD',[info]]
					},
					callback(data){
						var address=fns.checkError(data,'add',function(errno,error){
							uni.showToast({
								title:error,
								icon:'none'
							})
						})
						if(address.add){
							fns.success('添加成功',function(){
								_this.isNew=false;
								_this.isShow=true;
								_this.address_id=address.add
							})
						}
					},
					error(err){
						fns.err('err',err,1)
					}
				})
			},
			// 三级联动选择
			showMulLinkageThreePicker() {
			    this.$refs.mpvueCityPicker.show()
			},
			onConfirm(e) {
				console.log(e);
				var label=e.label;
			    this.userAddress = label;
				var labelArr=label.split('-');
				this.user.province=labelArr[0];
				this.user.city=labelArr[1];
				this.user.district=labelArr[2];
			},
			//添加收货地址
			newAddress() {
				this.isShow = false;
				this.isNew = true
			},
			//立即购买
			immediately(){
				this.pay_display=true;
			},
// 			pay(order_id,money){
// 				console.log('点击支付按钮',order_id,money);
// 				var _this=this
// 				_this.order_money=money,
// 				_this.order_id=order_id
// 				_this.pay_display=true
// 			},
			
			//提交订单
			submitForm(){
				var _this = this;
				
				var shopOrderSelfAddConfig = {
					//address_id:_this.address_id,
					//group_id:_this.goodsId,
					shop_goods_group_id:_this.goodsGroups.id,//2019-9-9
					user_address_id:_this.address_id,//2019-9-9
					
				};
				//2019-9-9
				ef.submit({
					request: {//SHOPGROUPGOODSSELFADDGROUP
						s: ['SHOPORDERGROUPSELFFOUND', [shopOrderSelfAddConfig]]
					},
					callback(data){
						var shopOrderSelfAddData = fns.checkError(data,'s',function(errno,error){
							uni.showToast({
								title:error,
								icon:'none',
								duration: 3000
							});
						});
						if( !shopOrderSelfAddData ){
							return false;
						}
						_this.order_id = shopOrderSelfAddData.s.shop_order_group_id;
						console.log('订单id', _this.order_id,shopOrderSelfAddData.s.shop_order_group_id);
						//return callbackFunction(shopOrderSelfAddData.s);
						
					},
					error(err){
						fns.err('提交订单失败', err, 1);
					}
				});
				//2019-9-9
				
				
				
				shopOrderSelfAddConfig.shop_order_group_id=_this.order_id;
				
				switch (_this.payMounted){
					case 1:
					_this.pay_method='user_money';
					_this.pay_pass_display = true;
					shopOrderSelfAddConfig.pay_method = 'user_money';
					_this.shopOrderPayment(shopOrderSelfAddConfig, function(response){
						_this.pay_money(response);
					});
						break;
					case 2:
					_this.pay_pass_display=false;
					_this.pay_method='alipay'
					shopOrderSelfAddConfig.pay_method = 'alipay'; //支付方式 weixinpay 微信支付、alipay 支付宝支付
					shopOrderSelfAddConfig.alipay_trade_type = "APP";
					_this.shopOrderPayment(shopOrderSelfAddConfig, function(response){
						_this.pay_alipay(response);
					});
						break;
					case 3:
						_this.pay_pass_display=false;
						_this.pay_method = 'weixinpay';
						shopOrderSelfAddConfig.pay_method = 'weixinpay';
					//#ifdef H5
						_this.payWeChatPMJSAPI();
					//#endif
					return
					
					_this.pay_pass_display=false;
					_this.pay_method = 'weixinpay';
					shopOrderSelfAddConfig.pay_method = 'weixinpay';
					// #ifdef MP-WEIXIN
					shopOrderSelfAddConfig.weixin_trade_type = "JSAPI";
					wx.login({
						//微信小程序登录获取code
						success(res) {
							console.log("wx.login"+JSON.stringify(res));
							if( res.code ){
								_this.code = res.code;
								shopOrderSelfAddConfig.weixin_login_code = res.code;
								_this.shopOrderPayment(shopOrderSelfAddConfig, function(response){
									_this.pay_weixin(response);
								});
							} else {
								_this.isDisable = false;
								console.log('登录失败！' + res.errMsg );
								console.log('登录失败！' + JSON.stringify(res) );
								uni.showToast({
									title: '登录失败！' + res.errMsg,
									icon: 'none',
									//duration: 30000
								});
							}
						}
					});
					// #endif
					// #ifdef APP-PLUS 
					shopOrderSelfAddConfig.weixin_trade_type = "APP";
					_this.shopOrderPayment(shopOrderSelfAddConfig, function(response){
						_this.pay_weixin(response);
					});
					// #endif
						break;		
				}
						
						
			},
			
			//付款
			shopOrderPayment( shopOrderSelfAddConfig, callbackFunction ){
				var _this = this;
				
				//没拿到id     2019-9-9
				
				//如果不是函数，则默认空函数
				if(typeof callbackFunction !='function'){
					callbackFunction = function(){};
				}
				
				ef.submit({
					request: {//SHOPGROUPGOODSSELFADDGROUP
						s: ['SHOPORDERGROUPSELFPAYMENT', [shopOrderSelfAddConfig]]
					},
					callback(data){
						console.log('调起支付',data)
						var shopOrderSelfAddData = fns.checkError(data,'s',function(errno,error){
							uni.showToast({
								title:error,
								icon:'none',
								duration: 3000
							});
						});
						if( !shopOrderSelfAddData ){
							return false;
						}
						_this.order_id = shopOrderSelfAddData.s.group_order_id;
						console.log('提交订单', shopOrderSelfAddData);
						return callbackFunction(shopOrderSelfAddData.s);
						
					},
					error(err){
						fns.err('提交订单失败', err, 1);
					}
				});
				
			},
			
			//微信公众号支付
			payWeChatPMJSAPI(response){
				var _this = this;
				console.log(response)
				ef.submit({
						request:{
							s:['SESSIONWEIXINACCESSTOKEN']
						},
						callback(data){
							var dataList=fns.checkError(data,'s',function(errno,error){
								uni.showToast({
									title: '请先确认微信授权',
									icon:'none'
								})
							})
							console.log(dataList);
							if(dataList.s){
								ef.submit({
									request: {
										s:[ 'SHOPGROUPGOODSSELFADDGROUP',
										[{
											group_id:_this.group_id,
											address_id:_this.address_id,
											pay_method: 'weixinpay',
											weixin_login_openid: dataList.s.openid,
											weixin_trade_type: 'MPJSAPI'
										}] 
										]
									},
									
									callback(data) {
										console.log('调起微信支付', data);
										var dataList = fns.checkError(data, 's', function(errno, error) {
											uni.showToast({
												title: error,
												icon: 'none'
											});
										});
										var ress = dataList.s;
										if (ress) {
											console.log('ress', ress);
											
											var getBrandWCPayRequest = {
											        appId: ress.appid,
													timeStamp: String(ress.time_stamp), // 支付签名时间戳，注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
													nonceStr: ress.nonce_str, // 支付签名随机串，不长于 32 位
													package: 'prepay_id='+ress.prepay_id, // 统一支付接口返回的prepay_id参数值，提交格式如：prepay_id=\*\*\*）
													signType: ress.sign_type, // 签名方式，默认为'SHA1'，使用新版支付需传入'MD5'
													paySign: ress.pay_sign, // 支付签名
											      };
											
											console.log('getBrandWCPayRequest', getBrandWCPayRequest);
											function onBridgeReady(){
											   WeixinJSBridge.invoke(
											      'getBrandWCPayRequest', getBrandWCPayRequest,
											    function(res){
													// uni.showToast({
													// 	title:JSON.stringify(res),
													// 	icon:'none',
													// 	duration:10000
													// })
											      if( res.err_msg == "get_brand_wcpay_request:ok" ){
											     
														
														uni.showToast({
															title:'支付成功',
															success() {
																setTimeout(function(){
																	uni.switchTab({
																	url: '../order/order'
																});
																},2000)
															}
														})
											      } 
												  if(res.err_msg == "get_brand_wcpay_request:fail" ){
													    uni.showToast({
													    	title:'支付失败',
															icon:'none'
													    })
												  }
												  if(res.err_msg == "get_brand_wcpay_request:cancel"){
													  uni.showToast({
													  	title:'已取消支付',
														icon:'none'
													  })
												  }
											   }); 
											}
											
											if (typeof WeixinJSBridge == "undefined"){
											   if( document.addEventListener ){
											       document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
											   }else if (document.attachEvent){
											       document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
											       document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
											   }
											}else{
											   onBridgeReady();
											}
											
										}else{
											console.log('提交订单失败', ress);
											_this.payWeChatPMJSAPI();
											
										}
										console.log('提交订单', ress);
										
									},
									error(err) {
										console.log('提交订单失败', err, 1);
									}
								});
								
								
							}else{
								
								console.log('location', location.href);
								
								//当 ACCESSTOKEN 不存在
								ef.left_token(function(left_token){
									var notify_url = encodeURIComponent(location.href);
									var url = ef.api_server_url+"?"+encodeURI('data=[["SESSIONWEIXINAUTHORIZE",[{"notify_url":"'+notify_url+'"}]]]')+"&token="+left_token;
									console.log(url);
									location.href = url;
								});
								
							}
						},
						error(err){
							fns.err('err',err,1)
						}
					})
			},
			
			//调起支付（微信）
			pay_weixin(wxArr) {
				var _this = this;
				_this.test='开始了'
				console.log('支付参数'+JSON.stringify(wxArr));
				console.log('调起支付');
				_this.test='调起支付'
				
				// #ifdef APP-PLUS
				var orderInfo = {
					appid:wxArr.appid,
					partnerid:wxArr.mch_id,//商户号
					prepayid:wxArr.prepay_id,//预支付交易会话ID
					package:'Sign=WXPay',//扩展字段,暂填写固定值Sign=WXPay
					noncestr:wxArr.nonce_str,//随机字符串
					timestamp:wxArr.time_stamp,//时间戳	
					sign:wxArr.pay_sign,//签名
				};
				// #endif
				
				uni.requestPayment({
					// #ifdef MP-WEIXIN
					provider: 'wxpay',
					timeStamp: String(wxArr.time_stamp),
					nonceStr: wxArr.nonce_str,
					package: 'prepay_id=' + wxArr.prepay_id,
					signType: wxArr.sign_type,
					paySign: wxArr.pay_sign,
					orderInfo:wxArr,
					// #endif
					// #ifdef APP-PLUS
					provider:'wxpay',
					orderInfo: JSON.stringify(orderInfo),
					// #endif
					success: function(res) {
						_this.test = '支付成功?'
						console.log('支付成功success:' , JSON.stringify(res));
						// return
						if (res.errMsg == 'requestPayment:ok') {
							_this.test='支付成功'
							uni.showToast({
								title: '支付成功',
								icon: 'none',
								success() {
									_this.payMoneyDispaly = false;
									
									uni.navigateTo({
										url:'../../pagesB/my-order/my-order'
									})
								}
							})	
						} 
					},
					fail: function(err) {
						_this.test = '调用支付失败' + JSON.stringify(err);
						console.log('调用支付失败' + JSON.stringify(err));
						return false;
					},
				});
			},
			
			//支付宝支付
			pay_alipay( response ){
				var _this = this;
				var ali = response.alipay;
				uni.requestPayment({
					provider: 'alipay',
					orderInfo:ali,
					success: function (res) {
						console.log('success:' + JSON.stringify(res));
						uni.showToast({
							title:'支付成功',
							icon:'none',
							success() {
								setTimeout(function(){
									_this.payMoneyDispaly = false;
									
									uni.navigateTo({
										url:'../../pagesB/my-order/my-order'
									});
								},1500)
							}
						});
					},
					fail: function (err) {
						console.log('fail:' + JSON.stringify(err));
					}
				});
			},
			 
			//调起预付款支付
			pay_money( response ){
				var _this = this;
				console.log('pay_money()', response);
				uni.showToast({
					title:'请输入支付密码',
					icon: 'none',
					success() {
						_this.order_id = response.group_order_id;
					}
				});
			},
			
			paymentPasswordBack(e){
				console.log("支付密码点击了返回，进来了",e);
				this.pay_pass_display = false;
				this.payMoneyDispaly = false;
			}, 
			onConfirms(e) {
				var _this = this;
				let password = e.value;
				console.log('password', password, password.length);
				if( password.length != 6 ){
					fns.err('请正确输入密码');
				}else{
					
					if( _this.payMoneyDispaly ){
						return false;
					}
					
					_this.payMoneyDispaly = true; 
					
					pay.shoppingCar(_this.order_id,'user_money',password,function(){
						fns.success('支付成功',function(){
							uni.showToast({
								title:'支付成功',
								success() {
									_this.pay_pass_display = false;
									setTimeout(function(){
										_this.payMoneyDispaly = false;
										uni.navigateTo({
											url:'../../pagesA/assembleOrder/assembleOrder'
										})
									},1000)
								}
							})
						});
					})
				}
				// this.pay_pass_display=false
			},
			
			//上面部分均为支付信息
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			//判断用户是否登录方法
			jugLogin(){
				var _this = this;
					ef.submit({
					request:{
						jugLogin:['USERSELF']
					},
					callback(data){
						var address=fns.checkError(data,'jugLogin',function(errno,error){
							uni.showToast({
								title:'请先登录',
								icon:'none',
								success() {
									if (ac) {
										clearInterval(setIntervalID);
									}
									var ac = setTimeout(function(){
										uni.reLaunch({
											url:'../../pagesA/register/register'
										});
										return
										// uni.reLaunch({
										// 			url:'../../pagesA/threelogin/threelogin'
										// 		})
									},2000)
								}
							})
						})
					},
					error(err){
						fns.err('err',err,1)
					}
				})
			},
			
			showContgo:function(){
				//判断用户是否登录
				this.jugLogin();
				this.xs=!this.xs;
				this.way=2;  //立即购买
			},
			showCont:function(){
				this.xs=!this.xs;
			},
			toCar(){
				var _this=this
				if(_this.way==1){
					// _this.shoopingCar();
					if(_this.button_disabled==true){
						fns.err('请选择规格属性');
						return;
					}else{
					
						ef.submit({
							request:{
								s:['SHOPCARTSELFADD',[{
									goods_sku_id:_this.sku_id,
									number:_this.number
									}]]
							},
							callback(data){
								if(fns.checkError(data,'s',function(errno,error){
									fns.err(error)
								})){
									fns.success('已加入购物车',function(){
										setTimeout(function(){
											uni.showToast({
												title:'已经加入购物车',
												icon:'none'
											})
										},1000)
										
									})
								}
								_this.xs=false;
							}
						})
					}
				}
				if(_this.way==2){
					_this.isShow=!_this.isShow;
					if(_this.button_disabled==true){
						fns.err('请选择规格属性');
						return;
					}else{
						_this.due=_this.number*_this.money_
						_this.button_disabled=false;
					}
					
				}
			},
			shoopingCar(){
				var _this=this
				if(!_this.sku_id){
					fns.err('请选择规格属性');
					return;
				}else{
					ef.submit({
						request:{
							s:['SHOPCARTSELFADD',[{
								goods_sku_id:_this.sku_id,
								number:_this.number
								}]]
						},
						callback(data){
							if(fns.checkError(data,'s',function(errno,error){
								fns.err(error)
							})){
								fns.success('已加入购物车',function(){
									
								})
							}
						}
					})
				}
			},
			add:function(){
				if(this.number>0){
					this.number++;
				}else{
					return
				}
				
			},
			lose:function(){
				if(this.number>1){
					this.number--;
				}else{
					return
				}
			},
			select(Class,id,index,indexs){
				var _this=this
				if(Class=='stockTrue'){
					_this.button_disabled=false;  //是否选择规格属性
					console.log(Class,id,index,indexs);
					var _thisSon=_this.goods_spu[index].son;
					var id=_this.goods_spu[index].son[indexs].id
					for(var i=0;i<_thisSon.length;i++){
						if(_thisSon[i].class_change && i!=indexs){
							_thisSon[i].class_change='stockTrue'
						}else if(_thisSon[i].class_change && i==indexs){
							_thisSon[i].class_change='selecteds'
						}
					}
					//
					for(var m=0;m<_this.goods_spu.length;m++){
						if(m!=index){
							var _thisSon=_this.goods_spu[m].son;
						for(var i=0;i<_thisSon.length;i++){
							var _id=_thisSon[i].id
							if(_thisSon[i].class_change=='stockTrue'){
								_thisSon[i].class_change=''
							}
								for (var k=0; k<_this.goods_sku.length;k++) {
									var sku=_this.goods_sku[k].spu_id;
									if(sku.indexOf(_id) != -1 && sku.indexOf(id) != -1 && _thisSon[i].class_change!='selecteds'){//
										_thisSon[i].class_change='stockTrue';
									}
								}
						}
						}
					}
					
				}else if(Class=='selecteds'){
					_this.button_disabled=true;  //是否选择规格属性
					console.log(Class,id,index,indexs);
					var _thisSon=_this.goods_spu[index].son;
					_thisSon[indexs].class_change='stockTrue'
					//
					for(var m=0;m<_this.goods_spu.length;m++){
						if(m!=index){
							var _thisSon=_this.goods_spu[m].son;
						for(var i=0;i<_thisSon.length;i++){
							var _id=_thisSon[i].id
							if(_thisSon[i].class_change=='stockTrue'){
								_thisSon[i].class_change=''
							}
								for (var k=0; k<_this.goods_sku.length;k++) {
									var sku=_this.goods_sku[k].spu_id;
									if(sku.indexOf(_id) != -1 && _thisSon[i].class_change!='selecteds'){//
										_thisSon[i].class_change='stockTrue';
									}
								}
						}
						}
					}
				}
				_this.moneyStock();
			},
			moneyStock(){
				var _this=this,ids=[];
				for(var m=0;m<_this.goods_spu.length;m++){
						var _thisSon=_this.goods_spu[m].son;
					for(var i=0;i<_thisSon.length;i++){
						if(_thisSon[i].class_change=='selecteds'){
							ids.push(_thisSon[i].id)
						}
					}
				}
				for (var k=0; k<_this.goods_sku.length;k++) {
					var sku=_this.goods_sku[k].spu_id;
					var key=false;
					for(var i=0;i<ids.length;i++){
						if(sku.indexOf(ids[i]) == -1){
							key=true;
							break;
						}
					}
					if(key==false){
						console.log('sku',_this.goods_sku[k]);
						_this.stock=_this.goods_sku[k].stock;
						_this.money_=_this.goods_sku[k].money;
						_this.sku_id=_this.goods_sku[k].id;
						break;
					}
				}
			},
			isTrue(){
				
			},
		    SeeMore(){
			uni.navigateTo({
				url:'../../pagesA/commentList/commentList?id='+this.id
			})
		   }
		}
	}
</script>
<style>
	.pl_item{
		height: 130px;float: left;box-shadow: 0px 0px 15px 0px rgba(232, 232, 232, 1)
	}
	.pl_userInfo{
		width: 140px;height: 100%;background-color: #fff;float:left;
	}
	.pl_headImg{
		width: 29px;height: 29px;border-radius: 50%;
	}
	.pl_nickname{
		width: 80px;padding-left: 10px;font-size: 28upx;
	}
	.pl_content{
		width: 90%;font-size: 12px;margin-left: 8px; font-size:26upx; color: #555555;word-wrap:break-word;
	}
	.pl_imgs{
		width: 130px;height: 100%;float:left;
	}
	.remark-title{
		width :100%;
		height :80upx;
		display: flex;
		font-size: 24upx;
		align-items: center;
		position :relative;
	}
	.remark-title text:nth-child(1){
		font-weight: 600;
			width: 50%;
			text-align: left;
	}
	.remark-title text:nth-child(2){
		font-weight :550;
			width: 50%	;
			color :#e44545;
			text-align:right;
			letter-spacing :3upx;
			margin-right :20upx;
	}
	.remark-title .icon{
		font-weight: 600;
			font-size: 32upx;
			position: absolute;
			top: 24upx;
			right :-2upx;
	}
	image{
		width: 100%;height: 100%;
	}
</style>
<style scoped lang="stylus" ref="stylesheet/stylus">
	.content
		width 100%
		.mianImageBox
			width 100%
			height 100%
			background-color #fff
			display flex
			align-items center       // 垂直居中
			flex-direction column
			position relative
			.operateBox
				width 95%
				height 10%
				.titleIcon
					width 49%
				.right
					text-align right
					margin-right 5upx
			.casual
				width 100%
				// height 600upx
				.swiper-box
					width 100%
					// height 560upx
					// margin-left 8%
					// padding-top 40upx
					.swiper
					   width 100%
						height 100%
						display flex
						justify-content center
						align-items center
						.image
							 width 100%
							 height 100%
			.price
				width 100%
				height 20px
				background-color #fff
				text:nth-child(1)
					font-size 44upx
					color red
					font-weight 600
					margin-right 24upx
				text:nth-child(2)
					font-size 24upx
					color #7c7c7c
				text:nth-child(3)
					display inline-block
					padding 5upx 15upx
					font-size 24upx
					color #fff
					background-color #e44545
					margin-left 15upx
			.goodsInfor
				width 95%
				// height 1000upx
				display flex
				justify-content center
				align-items center
				flex-wrap wrap
				.discountCard
					padding-left 20upx
					width 100%
					height 60upx
					background-color #f4f3f3
					text:nth-child(1)
						font-size 22upx
						color #fff
						background-color #333
						padding 5upx 10upx
					text:nth-child(2)
						font-size 22upx
						color #fff
						background-color #666
						padding 5upx 10upx
					text:nth-child(3)
						font-size 24upx
						color #333
						letter-spacing 3upx
						margin-left 20upx
						margin-right 240upx
					text:nth-child(4)
						display inline-block
						font-size 24upx
						line-height 60upx
						text-align center
						width 80upx
						height 60upx
						padding 0 12upx
						background-color #ccc
				.goodsdes
					width 100%
					height 150upx
					padding-top 30upx
					.choose-kinds
						width 100%
						height 68upx
						font-size 24upx
						text
							padding 10upx 20upx
							border-radius 20upx
							background-color #fff
						text:nth-child(1)
							border 1px solid #ccc
						.ex
							color #e44545
							margin-left 20upx
							border 1px solid #e44545
					.goods-name
						width 100%
						height 110upx
						font-size 32upx
						background-color #fff
						line-height 45upx
						.self
							color #e44545
							font-size 24upx
							padding 3upx 12upx
							border 1px solid #e44545
							margin-right 20upx
						.details-des
							display block
							margin 10upx 0
							font-size 24upx
							color #7c7c7c
							letter-spacing 2upx
					.other-des
						width 100%
						height 80upx
						font-size 24upx
						color #333
						background-color #f4f3f3
						display flex
						justify-content left
						align-items center
						.origin, .method
							width 30%
							image
								width 40upx
								height 30upx
								margin -2upx 20upx
							.img
								background-color #fff
							text
								display inline-block
								line-height 80upx
								
				.deliverInfor
					width 100%
					height 130upx
					font-weight 600
					.to
						width 100%
						height 110upx
						line-height 110upx
						font-size 28upx
						border-top 1px solid #f4f3f3
						border-bottom 1px solid #f4f3f3
						position relative
						.first
							margin 0 22upx
						.to
							border none
							margin-right 15upx
						.icon
							font-size 32upx
							position absolute
							top 3upx
							right -2upx
					.freight
						width 100%
						height 110upx
						line-height 110upx
						font-size 28upx
						background-color #fff
						position relative
						.first
							margin 0 22upx
						.icon
							font-size 32upx
							position absolute
							top 3upx
							right -2upx
					.intro
						width 100%
						height 110upx
						line-height 110upx
						font-size 28upx
						border-top 1px solid #f4f3f3
						position relative
						.first
							margin 0 18upx
						.des
							display inline-block
							font-size 24upx
							font-weight 400
							height 60upx
							color #ccc
						.icon
							font-size 32upx
							position absolute
							top 3upx
							right -2upx
				.remark
					width 100%
					height 400upx
					overflow-x scroll
					border-bottom 1px solid #f4f3f3
					.remark-title
						
					.remark-box
						width 700px
						height 130px
						// background-color #ccc
						display flex
						flex-wrap nowrap
						.remark-item
							width 600upx
							height 100%
							background-color #fff
							display flex
							flex-wrap nowrap
							.left
								padding-left 20upx
								width 50%
								.user-infor
									width 100%
									padding-top 10upx
									display flex
									justify-content left
									align-items center
									image
										width 50upx 
										height 50upx
										border-radius 50%
									.user-name
										font-size 24upx
										margin-left 20upx
										color #7c7c7c
								.thought
									border 1px solid #e44545
									font-size 24upx
									color #e44545
									padding 1upx 20upx
								.thought-des
									font-size 24upx
									margin-left 25upx
							.img-box
								width 50%
								image
									width 100%
									height 280upx
				.ask
					width 100%
					height 280upx
					.ask-title
						width 100%
						height 80upx
						display flex
						font-size 24upx
						align-items center
						position relative
						background-color #fff
						text:nth-child(1)
							font-weight 600
							width 100%
							text-align left
						.icon
							font-weight 600
							font-size 32upx
							position absolute
							top 24upx
							right -2upx
					.ask-item
						width 100%
						height 200upx
						.text
							width 100%
							display flex
							justify-content left   // 水平居中
							align-items center       // 垂直居中
							flex-direction row
							font-size 24upx
							margin-bottom 20upx
							background-color #fff
							.askS
								flex 0.5
								color #e44545
								padding 2upx
								border 1px solid #e44545
							.askW
								flex 13
								margin-left 15upx
							.reply
								flex 2						
				.brandStore
					width 100%
					height auto
					.brand-title
						width 100%
						display flex
						justify-content center   // 水平居中
						align-items center       // 垂直居中
						flex-direction row
						margin-bottom 30upx
						image
							flex 1.2
							height 100upx
						.good-items
							flex 6
							color #333
							margin-left 20upx
							font-size 24upx
							text
								width 100%
								display block
							
						.enter
							font-size 24upx
							letter-spacing 2upx
							color #e44545
							margin-right 10upx
					.goodgoods
						width 100%
						.recomend-goods-item2
							display inline-block
							width 22%
							height 240upx
							margin 20upx 10upx
							.img-box
								width 100%
								height 50%
								display flex
								justify-content center
								align-items center
								image
									width 150upx
									height 150upx
							.des
								display block
								font-size 28upx
								margin 30upx 0 5upx
								color #666
							.price
								font-size 32upx
								color red
					.guessGoodsBox
						width 100%
						height auto 
						margin-top 70upx
						margin-bottom 100upx
						background-color #fff
						.topBar
							width 100%
							height 80upx
							display flex
							justify-content left   // 水平居中
							align-items center       // 垂直居中
							flex-direction row
							text-align center
							font-size 24upx
							font-weight 600
							border-bottom 1px solid #f4f3f3
							.active
								flex 1
								.active
									height 100%
									padding-bottom 20upx
									border-bottom 3px solid #333
							.normal
								flex 1
						.goodsContentBox
							width 100%
							height 720upx
							margin-bottom 20upx
							display flex
							justify-content center   // 水平居中
							align-items center     // 垂直居中
							flex-direction column
							flex-wrap wrap
							.goods-item
								width 32%
								height 47%
								margin-bottom 10upx
								display flex
								justify-content center   // 水平居中
								align-items center 
								flex-direction column
								image
									width 150upx
									height 200upx
								.goods-name
									display block
									font-size 24upx
									width 200upx
								.now-price
									color #e44545
									margin 10upx 0
									font-size 24upx
						.button-box	
							width 100%
							height 60upx
							display flex
							justify-content center   // 水平居中
							align-items center       // 垂直居中
							flex-direction row
							text-align center
							text
								flex 1
								border 1px solid #333
								font-size 24upx
								padding 15upx
								letter-spacing 2upx
							.details
								color #fff
								background-color #333
						.imgDetails
							width 100%
							height 800upx
							.imgDetails-title
								width 100%
								height 100upx
								font-size 24upx
								font-weight 600
								letter-spacing 2upx
								display flex
								justify-content center   // 水平居中
								align-items center       // 垂直居中
								flex-direction row
							.productsBox
								.infor
									display block
									width 100%
									height 80upx
									color #333
									font-size 32upx
									font-weight 600
								.origin
									width 98%
									margin 0 auto
									border 1px solid #f4f3f3
									background-color #fff
									.infor-items
										width calc(100% - 20upx)
										text-align left
										
										padding-left 20upx
										font-size 24upx
										border-bottom 1px solid #f4f3f3
										text:nth-child(1)
											display inline-block
											width 20%
											padding 23upx 0 
											border-right 1px solid #f4f3f3
											
										text:nth-child(2)
											display inline-block
											width 65%
											font-wight 600
											padding 23upx 0 
											margin-left 20upx
							.getMore
								width 100%
								height 80upx
								line-height 80upx
								text-align center
								font-size 24upx
								margin-bottom 40upx
							.brandAuth
								width 120upx
								height 120upx
								margin 20upx auto
								border-radius 50%
								text-align center
								margin-top 60upx
								border 1px solid #ccc
								margin-bottom 200upx
								
								text
									display flex
									margin-top 17upx
									justify-content center
									align-items center
									line-height 30upx
									color #333
									font-size 32upx
											
			.shoppingCarBox	
				width 100%
				height 100upx
				display flex
				justify-content center
				align-items center
				font-size 24upx
				position fixed
				bottom 0 
				left 0
				.collection
					flex 1
					height 100%
					display flex
					justify-content center
					align-items center
					flex-direction column
					background-color #fff
					border-right 1px solid #f4f3f3
					border-top 1px solid #f4f3f3
					image
						width 40upx
						height 40upx
				.shoppingCar
					flex 1
					height 100%
					flex-direction column
					display flex
					justify-content center
					align-items center
					border-top 1px solid #f4f3f3
					background-color #fff
					image
						width 40upx
						height 40upx
				.add
					flex 3
					height 100%
					display flex
					color #fff
					font-size 28upx
					justify-content center
					align-items center
					background-color #333
				.buy
					flex 3
					height 100%
					display flex
					font-size 28upx
					justify-content center
					align-items center
					color #fff
					background-color #E60B30
		.mask_content
			width 100%
			height 600px
			background-color rgba(0, 0, 0 , 0.5)
			position fixed
			top 0
			left 0
			.mask-box
				position fixed
				bottom 0
				left 0
				font-size 26upx
				width 100%
				background-color #fff
				.mask-item
					width 100%
					height 170px
					display flex
					justify-content center
					align-items center
					flex-direction column
					text-align center
					background-color #fff
		
					.address, .deliver, .ticket, .invoice, .luckbag, .money, .agree
						flex 1
					.deliver, .ticket, .invoice, .luckbag, .money, .agree
						border-top 1px solid #ccc
					.address
						width 100%
						background-color #fff
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
							color #E60B30
						.icon
							flex 1
							color #E60B30
							
					.deliver
						width 100%
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
						.icon
							flex 1
					.ticket
						width 100%
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
						.icon
							flex 1
					.invoice
						width 100%
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
						.icon
							flex 1
					.luckbag
						width 100%
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
						.icon
							flex 1
					.money
						width 100%
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
							color #E60B30
						.tax
							color #ccc
							font-size 20upx
						.icon
							flex 1
					.agree
						width 100%
						display flex
						justify-content center
						align-items center	
						flex-direction row
						.address-item
							flex 4
							text-align left
							padding 10px
						.add
							flex 2
						.icon
							margin-left 5px
							width 24px
							height 24px
				.submit-btn
					width 100%
					height 60px
					background-color #E60B30
					text-align center
					line-height 60px
					color #fff
			.new-address-box
				position fixed
				bottom 0
				left 0
				font-size 26upx
				width 100%
				height 325px
				background-color #ccc
				.new-address-item_
					width 100%
					height 275px
					background-color #fff
					.address_
						width 95%
						height 50px
						margin 0 auto
						display flex
						justify-content center
						align-items center
						flex-direction row
						.address-item
							flex 1
							text-align left
						.icon
							flex 1
							text-align right
					.main-content
						width 100%
						height 220px
						display flex
						justify-content center
						align-items center
						flex-direction column
						text-align center
						border-top 1px solid #ccc
						.name-box
							flex 1
							width 100%
							height 100%
							display flex
							text-align left
							align-items center
							background-color #fff
							.name
								width 90%
								height 70%
								padding-left 10px
								background-color #f4f3f3
								margin 0 auto
							
						.phone-box
							flex 1
							width 100%
							height 100%
							display flex
							text-align left
							align-items center
							.phone
								width 90%
								height 70%
								padding-left 10px
								background-color #f4f3f3
								margin 0 auto
						.area-box
							flex 1
							width 100%
							height 100%
							display flex
							text-align left
							align-items center
							background-color #fff
							.area
								width 90%
								height 70%
								padding-left 10px
								background-color #f4f3f3
								margin 0 auto
						.details-box
							flex 1
							width 100%
							height 100%
							display flex
							text-align left
							align-items center
							.details
								width 90%
								height 70%
								padding-left 10px
								background-color #f4f3f3
								margin 0 auto
						.selected-box
							flex 1
							width 90%
							height 100%
							margin 0 auto
							display flex
							align-items center
							text-align left
							background-color #fff
							.empty-box
								flex 1
								height 69%
								display flex
								align-items center
								.empty
									width 20px
									height 20px
									border-radius 50%
									border 1px solid #333
							.selected-address
								flex 9
								height 70%
								display flex
								align-items center
				.submit-btn
					width 100%
					height 50px
					background-color #E60B30
					text-align center
					padding-top 15px
					color #fff
			.pay-methods
				position fixed
				bottom 0
				left 0
				font-size 26upx
				width 100%
				height 300px
				background-color pink
				.methods-box
					width 100%
					height 250px
					background-color #fff
					display flex
					justify-content center
					align-items center
					flex-direction column
					text-align center
					.title-box
						width 100%
						flex 0.9
						display flex
						align-items center
						justify-content center
						border-bottom 1px solid #ccc
						position relative
						.title
							width 100%
						image
							position absolute
							top 25px
							right 10px
							width 25px
							height 25px
					.pay-time-box
						width 100%
						flex 1
						display flex
						align-items center
						justify-content center
						border-bottom 1px solid #ccc
						.text
							flex 5.5
							text-align right
						.price
							flex 1.5
							color #E60B30
							text-align left
						.symbol
							flex 2
					.ali-pay
						width 100%
						flex 0.8
						display flex
						align-items center
						justify-content left
						padding-left 20px
						border-bottom 1px solid #ccc
						position relative
						image
							width 24px
							height 24px
						.select
							position absolute
							top 10px
							right 18px
					.weChat-pay
						width 100%
						flex 0.8
						display flex
						align-items center
						justify-content left
						padding-left 20px
						position relative
						image
							width 24px
							height 24px
						.select
							position absolute
							top 10px
							right 18px
					.active
						background-color #ccc
				.submit-btn
					width 100%
					height 50px
					background-color #E60B30
					text-align center
					padding-top 15px
					color #fff	
							
</style>
<style>
	/* .mask_content{
		width: 100%;
		height: 150upx;
		position: fixed;
		
	} */
	
	/* 上面部分均为支付 */
	.selecteds{
		color: red!important;
		background-color: gray!important;
	}
	.stockTrue{
		color: #000!important;
		font-weight: 600!important;
	}
	.shoppingx{
		width :100%;
		height:auto;
		background-color: #ffffff;
		bottom :0px;
		position :fixed;
		font-size: 30upx;
		}
	 .shoppingxx{
		 width: 100%;
		 padding-left:5%;
	 }
	 .text-title{
		 float: left;
		 width: 100%;
		 height: 60upx;
		 line-height: 60upx;
	 }
	.shoppingx-span{
		float: left;
		width: 100%;
		position: relative;
		margin-top: 5upx;
	}
	
	
	.shopping-for text{
		float: left;
		margin-right:10upx ;
		position: relative;
		text-align: center;
		width:auto;
		/* height: 60upx; */
		/* line-height: 20upx; */
		background-color: #E6E6E6;
		padding-left:15upx;
		padding-right:15upx;
		padding-bottom: 5upx;
		padding-top: 5upx;
	}
	.quantity {
		float:left;
		width: 100%;
		height: 150upx;
		line-height: 80upx;
		margin-top: 25upx;
		margin-bottom: 30upx;
	}
	.quantity-right {
		float: right;
		margin-right: 100upx;
	}
	.quantity-right text{
		width: 50upx;
		height: 20upx;
		background-color:#e6e6e6 ;
		margin-left: 40upx;
		padding: 20upx;
	}
	.ascertain{
		position: absolute;
		bottom: 0px;
		width: 90%;
		float: left;
	}
	.close{
		width:100upx;
		height: 100upx;
		position: absolute;
		top:0px;
		right: 0px;
		line-height: 100upx;
	}
	.change1{
		color: grey;
		font-weight: 300;
		padding: 1 10px;
		border-radius: 10px;
	}
	.change2{
		color:#DD524D;
	}
	.messageBox{
		width: 96%;
		height: auto;
		margin-left: 2%;
		margin-right: 2%;
		display: flex;
		font-size: 28upx;
	}
</style>

